package put.poznan.qmese.matlab.model;

import java.util.HashMap;
import java.util.Map;

public class Memory {

	private static Map<String,Matrix> memo = new HashMap<String,Matrix>();
	
	
	public static Matrix getMatrix(String id){
		if (memo.containsKey(id)){
			return memo.get(id);
		}
		return null;
		
	}
	
	public static void init(){
		Matrix m = new Matrix();
		m.setMatrix(new double[][]{{1,2,3},{1,2,3},{1,2,3}});
		m.setId("A");
		put("A",m);
	
		m.setMatrix(new double[][]{{1,2,3},{1,2,3},{1,2,3}});
		m.setId("B");
		put("B",m);
		
	}
	
	public static void put(String id, Matrix matrix){
		memo.put(id, matrix);
	}
	
	
}
